<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return 'api good ';
    return $request->user();
});

Route::any('/members/login', 'MembersController@login');
Route::any('/members/codeToSession', 'MembersController@codeToSession');
Route::any('/members/getAccessToken', 'MembersController@getAccessToken');
Route::any('/members/wxaes', 'MembersController@wxaes');
Route::any('/members/info', 'MembersController@info');

Route::any('/category/index', 'CategoriesController@index');
Route::any('/category/imgUpload', 'CategoriesController@imgUpload');
Route::any('/article/add', 'ArticlesController@add');
Route::any('/article/getList', 'ArticlesController@getList');
Route::any('/article/getCateList', 'ArticlesController@getCateList');
Route::any('/article/del', 'ArticlesController@del');
Route::any('/article/show', 'ArticlesController@show');
Route::any('/article/edit', 'ArticlesController@edit');

